/*
 * Flowable CMMN REST API
 * # flowable / flowəb(ə)l /    - a compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.  - a lightning fast, tried and tested BPMN 2 process engine written in Java. It is Apache 2.0 licensed open source, with a committed community.  - can run embedded in a Java application, or as a service on a server, a cluster, and in the cloud. It integrates perfectly with Spring. With a rich Java and REST API, it is the ideal engine for orchestrating human or system activities.
 *
 * OpenAPI spec version: v1
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package com.ibm.risk.irmp.workflow.client.flowable.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * RepetitionRule
 */

public class RepetitionRule {
  @JsonProperty("id")
  private String id = null;

  @JsonProperty("xmlRowNumber")
  private Integer xmlRowNumber = null;

  @JsonProperty("xmlColumnNumber")
  private Integer xmlColumnNumber = null;

  @JsonProperty("extensionElements")
  private Map<String, List<ExtensionElement>> extensionElements = null;

  @JsonProperty("attributes")
  private Map<String, List<ExtensionAttribute>> attributes = null;

  @JsonProperty("documentationTextFormat")
  private String documentationTextFormat = null;

  @JsonProperty("documentation")
  private String documentation = null;

  @JsonProperty("name")
  private String name = null;

  @JsonProperty("parent")
  private PlanFragment parent = null;

  @JsonProperty("condition")
  private String condition = null;

  @JsonProperty("repetitionCounterVariableName")
  private String repetitionCounterVariableName = null;

  @JsonProperty("collectionVariableName")
  private String collectionVariableName = null;

  @JsonProperty("elementVariableName")
  private String elementVariableName = null;

  @JsonProperty("elementIndexVariableName")
  private String elementIndexVariableName = null;

  @JsonProperty("maxInstanceCount")
  private Integer maxInstanceCount = null;

  @JsonProperty("parentStage")
  private Stage parentStage = null;

  public RepetitionRule id(String id) {
    this.id = id;
    return this;
  }

   /**
   * Get id
   * @return id
  **/
  @ApiModelProperty(value = "")
  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public RepetitionRule xmlRowNumber(Integer xmlRowNumber) {
    this.xmlRowNumber = xmlRowNumber;
    return this;
  }

   /**
   * Get xmlRowNumber
   * @return xmlRowNumber
  **/
  @ApiModelProperty(value = "")
  public Integer getXmlRowNumber() {
    return xmlRowNumber;
  }

  public void setXmlRowNumber(Integer xmlRowNumber) {
    this.xmlRowNumber = xmlRowNumber;
  }

  public RepetitionRule xmlColumnNumber(Integer xmlColumnNumber) {
    this.xmlColumnNumber = xmlColumnNumber;
    return this;
  }

   /**
   * Get xmlColumnNumber
   * @return xmlColumnNumber
  **/
  @ApiModelProperty(value = "")
  public Integer getXmlColumnNumber() {
    return xmlColumnNumber;
  }

  public void setXmlColumnNumber(Integer xmlColumnNumber) {
    this.xmlColumnNumber = xmlColumnNumber;
  }

  public RepetitionRule extensionElements(Map<String, List<ExtensionElement>> extensionElements) {
    this.extensionElements = extensionElements;
    return this;
  }

  public RepetitionRule putExtensionElementsItem(String key, List<ExtensionElement> extensionElementsItem) {
    if (this.extensionElements == null) {
      this.extensionElements = new HashMap<String, List<ExtensionElement>>();
    }
    this.extensionElements.put(key, extensionElementsItem);
    return this;
  }

   /**
   * Get extensionElements
   * @return extensionElements
  **/
  @ApiModelProperty(value = "")
  public Map<String, List<ExtensionElement>> getExtensionElements() {
    return extensionElements;
  }

  public void setExtensionElements(Map<String, List<ExtensionElement>> extensionElements) {
    this.extensionElements = extensionElements;
  }

  public RepetitionRule attributes(Map<String, List<ExtensionAttribute>> attributes) {
    this.attributes = attributes;
    return this;
  }

  public RepetitionRule putAttributesItem(String key, List<ExtensionAttribute> attributesItem) {
    if (this.attributes == null) {
      this.attributes = new HashMap<String, List<ExtensionAttribute>>();
    }
    this.attributes.put(key, attributesItem);
    return this;
  }

   /**
   * Get attributes
   * @return attributes
  **/
  @ApiModelProperty(value = "")
  public Map<String, List<ExtensionAttribute>> getAttributes() {
    return attributes;
  }

  public void setAttributes(Map<String, List<ExtensionAttribute>> attributes) {
    this.attributes = attributes;
  }

  public RepetitionRule documentationTextFormat(String documentationTextFormat) {
    this.documentationTextFormat = documentationTextFormat;
    return this;
  }

   /**
   * Get documentationTextFormat
   * @return documentationTextFormat
  **/
  @ApiModelProperty(value = "")
  public String getDocumentationTextFormat() {
    return documentationTextFormat;
  }

  public void setDocumentationTextFormat(String documentationTextFormat) {
    this.documentationTextFormat = documentationTextFormat;
  }

  public RepetitionRule documentation(String documentation) {
    this.documentation = documentation;
    return this;
  }

   /**
   * Get documentation
   * @return documentation
  **/
  @ApiModelProperty(value = "")
  public String getDocumentation() {
    return documentation;
  }

  public void setDocumentation(String documentation) {
    this.documentation = documentation;
  }

  public RepetitionRule name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Get name
   * @return name
  **/
  @ApiModelProperty(value = "")
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public RepetitionRule parent(PlanFragment parent) {
    this.parent = parent;
    return this;
  }

   /**
   * Get parent
   * @return parent
  **/
  @ApiModelProperty(value = "")
  public PlanFragment getParent() {
    return parent;
  }

  public void setParent(PlanFragment parent) {
    this.parent = parent;
  }

  public RepetitionRule condition(String condition) {
    this.condition = condition;
    return this;
  }

   /**
   * Get condition
   * @return condition
  **/
  @ApiModelProperty(value = "")
  public String getCondition() {
    return condition;
  }

  public void setCondition(String condition) {
    this.condition = condition;
  }

  public RepetitionRule repetitionCounterVariableName(String repetitionCounterVariableName) {
    this.repetitionCounterVariableName = repetitionCounterVariableName;
    return this;
  }

   /**
   * Get repetitionCounterVariableName
   * @return repetitionCounterVariableName
  **/
  @ApiModelProperty(value = "")
  public String getRepetitionCounterVariableName() {
    return repetitionCounterVariableName;
  }

  public void setRepetitionCounterVariableName(String repetitionCounterVariableName) {
    this.repetitionCounterVariableName = repetitionCounterVariableName;
  }

  public RepetitionRule collectionVariableName(String collectionVariableName) {
    this.collectionVariableName = collectionVariableName;
    return this;
  }

   /**
   * Get collectionVariableName
   * @return collectionVariableName
  **/
  @ApiModelProperty(value = "")
  public String getCollectionVariableName() {
    return collectionVariableName;
  }

  public void setCollectionVariableName(String collectionVariableName) {
    this.collectionVariableName = collectionVariableName;
  }

  public RepetitionRule elementVariableName(String elementVariableName) {
    this.elementVariableName = elementVariableName;
    return this;
  }

   /**
   * Get elementVariableName
   * @return elementVariableName
  **/
  @ApiModelProperty(value = "")
  public String getElementVariableName() {
    return elementVariableName;
  }

  public void setElementVariableName(String elementVariableName) {
    this.elementVariableName = elementVariableName;
  }

  public RepetitionRule elementIndexVariableName(String elementIndexVariableName) {
    this.elementIndexVariableName = elementIndexVariableName;
    return this;
  }

   /**
   * Get elementIndexVariableName
   * @return elementIndexVariableName
  **/
  @ApiModelProperty(value = "")
  public String getElementIndexVariableName() {
    return elementIndexVariableName;
  }

  public void setElementIndexVariableName(String elementIndexVariableName) {
    this.elementIndexVariableName = elementIndexVariableName;
  }

  public RepetitionRule maxInstanceCount(Integer maxInstanceCount) {
    this.maxInstanceCount = maxInstanceCount;
    return this;
  }

   /**
   * Get maxInstanceCount
   * @return maxInstanceCount
  **/
  @ApiModelProperty(value = "")
  public Integer getMaxInstanceCount() {
    return maxInstanceCount;
  }

  public void setMaxInstanceCount(Integer maxInstanceCount) {
    this.maxInstanceCount = maxInstanceCount;
  }

  public RepetitionRule parentStage(Stage parentStage) {
    this.parentStage = parentStage;
    return this;
  }

   /**
   * Get parentStage
   * @return parentStage
  **/
  @ApiModelProperty(value = "")
  public Stage getParentStage() {
    return parentStage;
  }

  public void setParentStage(Stage parentStage) {
    this.parentStage = parentStage;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    RepetitionRule repetitionRule = (RepetitionRule) o;
    return Objects.equals(this.id, repetitionRule.id) &&
        Objects.equals(this.xmlRowNumber, repetitionRule.xmlRowNumber) &&
        Objects.equals(this.xmlColumnNumber, repetitionRule.xmlColumnNumber) &&
        Objects.equals(this.extensionElements, repetitionRule.extensionElements) &&
        Objects.equals(this.attributes, repetitionRule.attributes) &&
        Objects.equals(this.documentationTextFormat, repetitionRule.documentationTextFormat) &&
        Objects.equals(this.documentation, repetitionRule.documentation) &&
        Objects.equals(this.name, repetitionRule.name) &&
        Objects.equals(this.parent, repetitionRule.parent) &&
        Objects.equals(this.condition, repetitionRule.condition) &&
        Objects.equals(this.repetitionCounterVariableName, repetitionRule.repetitionCounterVariableName) &&
        Objects.equals(this.collectionVariableName, repetitionRule.collectionVariableName) &&
        Objects.equals(this.elementVariableName, repetitionRule.elementVariableName) &&
        Objects.equals(this.elementIndexVariableName, repetitionRule.elementIndexVariableName) &&
        Objects.equals(this.maxInstanceCount, repetitionRule.maxInstanceCount) &&
        Objects.equals(this.parentStage, repetitionRule.parentStage);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, xmlRowNumber, xmlColumnNumber, extensionElements, attributes, documentationTextFormat, documentation, name, parent, condition, repetitionCounterVariableName, collectionVariableName, elementVariableName, elementIndexVariableName, maxInstanceCount, parentStage);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class RepetitionRule {\n");

    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    xmlRowNumber: ").append(toIndentedString(xmlRowNumber)).append("\n");
    sb.append("    xmlColumnNumber: ").append(toIndentedString(xmlColumnNumber)).append("\n");
    sb.append("    extensionElements: ").append(toIndentedString(extensionElements)).append("\n");
    sb.append("    attributes: ").append(toIndentedString(attributes)).append("\n");
    sb.append("    documentationTextFormat: ").append(toIndentedString(documentationTextFormat)).append("\n");
    sb.append("    documentation: ").append(toIndentedString(documentation)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    parent: ").append(toIndentedString(parent)).append("\n");
    sb.append("    condition: ").append(toIndentedString(condition)).append("\n");
    sb.append("    repetitionCounterVariableName: ").append(toIndentedString(repetitionCounterVariableName)).append("\n");
    sb.append("    collectionVariableName: ").append(toIndentedString(collectionVariableName)).append("\n");
    sb.append("    elementVariableName: ").append(toIndentedString(elementVariableName)).append("\n");
    sb.append("    elementIndexVariableName: ").append(toIndentedString(elementIndexVariableName)).append("\n");
    sb.append("    maxInstanceCount: ").append(toIndentedString(maxInstanceCount)).append("\n");
    sb.append("    parentStage: ").append(toIndentedString(parentStage)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}
